package com.zretc.dao;

import com.zretc.entity.Seller;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;

import java.util.Map;

/**
 *
 */
@Repository
@Mapper
public interface SellerMapper {

    /**
     * @author马福又
     * 登录卖家界面
     * @param sellerAccount
     * @param sellerPassword
     * @return
     */
    Seller getSellerByIdAndPassword(@Param("sellerAccount")String sellerAccount, @Param("sellerPassword")String sellerPassword);

    /**
     * @author马福又
     * 注册新用户
     * @param seller
     * @return
     */
    int setSeller(Seller seller);

    /**
     * @author马福又
     * 修改卖家信息
     * @param param
     * @return
     */
    int updateBySellerId(Map<String,Object> param);

    /**
     * @author马福又
     * 注册时判断用户名是否相同
     * @param sellerAccount
     * @return
     */
    Seller getSeller(String sellerAccount);
}
